home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / keyb / uncle13.zip / UNCLE.DOC < prev    next >
Text File  |  1988-11-08  |  7KB  |  178 lines

  1. ========UNCLE - UN*x(c-shell)-like Command Line Editor for MS-DOS========
  2.  
  3. 8 November 1988 (version 1.3)
  4. Jack C. Morrison
  5. 14578 Blue Sky Road
  6. Hacienda Heights, CA 91745
  7. jackm@jpl-devvax.jpl.nasa.gov (or elroy.jpl.nasa.gov!jpl-devvax!jackm)
  8.  
  9. INTRODUCTION
  10. ============
  11. UNCLE is a TSR program in the tradition of CED and DOSEDIT, replacing
  12. the DOS buffered input function (0Ah) with enhanced editing and
  13. history capability. The primary differences in UNCLE are
  14.  
  15.     a) UN*X C-shell style history substitutions
  16.     b) Personal preference configuration options
  17.  
  18. STARTUP
  19. ======
  20. Install UNCLE with the following command (best put into AUTOEXEC.BAT):
  21.  
  22.     [path]UNCLE [-n] [-ise] [-ose] [-x] [-#c] [-e] [alias_file]
  23.  
  24. If an unknown option is specified, a usage message is displayed and
  25. UNCLE is not installed. Options can be entered in any order, except 
  26. that whichever option -o or -i occurs LAST in the command line 
  27. determines the initial insert/overwrite mode UNCLE uses for each call.
  28. Default is to start in insert mode.
  29.  
  30. -n sets the size of the history buffer in bytes. Default is 512,
  31.     minimum is 256. Maximum history+alias size is 40000.
  32.  
  33. -ise defines the insert mode cursor shape. 'S' and 'e' are hex characters
  34.     (0-9 or A-D) indicating the start and end cursor scan lines.
  35.     Default is -i0C, which is a full block cursor for monochrome. 
  36.     (For color displays, only use 0-7 for 's' and 'e').
  37.  
  38. -ose defines the overwrite mode cursor shape. 'S' and 'e' are as for -i.
  39.     Default is -oBD, which is an underline cursor for monochrome. 
  40.  
  41. -x enables translation of slash characters on input: "/" into "\"
  42.     and vice-versa. This makes pathname typing easier for
  43.     unophiles - use '/' in pathnames, '\' for DOS command options.
  44.     Default is disabled.
  45.  
  46. -#c enables output of a history number before reading input. 'C'
  47.     is any character to be output after the number (see example).
  48.     Default is not to output anything.
  49.  
  50. -e bypasses deallocation of the environment segment at startup. 
  51.     Default is to deallocate it, freeing up a little space which may
  52.     or may not be usable. If you use a program that scans the DOS
  53.     memory pool and prints program names to show what's loaded, you
  54.     may want to use this option. In any case, it's a good idea not to
  55.     set any environment variables (including PROMPT and PATH) until
  56.     after all your TSR's are loaded.
  57.  
  58. alias_file is the pathname of an ASCII text file containing alias
  59.     definition lines in the form
  60.  
  61.     alias_name alias_value
  62.  
  63.     "Alias_name" should appear at the start of the line, and 
  64.     there should be exactly one space between the name and value.
  65.  
  66. Example: try
  67.     UNCLE -x -#] -1024 aliases
  68.  
  69. where the DOS prompt is set to "$p [", and "aliases" contains
  70.  
  71.     pwd cd
  72.     h history 15
  73.     rm del
  74.     ls dir/w
  75.  
  76. Now you can pretend your PC is running UN*X!
  77.  
  78. Once installed, UNCLE takes about 8K of memory plus history and
  79. alias buffers. If it gives you trouble, try changing the order
  80. of UNCLE and other TSR startups in your AUTOEXEC.BAT file.
  81.  
  82. LINE EDITING
  83. ============
  84. The usual PC-style line-editing keys are supported:
  85.  
  86. LEFT, RIGHT    move the cursor left or right one column.
  87. ^LEFT, ^RIGHT    move the cursor left or right one word.
  88. HOME, END     move the cursor to the start or end of the line.
  89. BACKSPACE    deletes the character left of the cursor.
  90. DEL        deletes the character under the cursor.
  91. INSERT        toggles insert/overwrite mode.
  92. ^U, ^X, ESC, ^HOME delete the entire line.
  93. ^END        deletes everything after the cursor.
  94. UP, DOWN    recall the previous or next history line, if any.
  95. RETURN        complete the input.
  96.  
  97. HISTORY SUBSTITUTION
  98. ====================
  99. In addition to the up/down arrow keys, command lines in the history
  100. list can be accessed using a subset of UN*X C-shell history syntax:
  101.  
  102. !!        recall previous command
  103. !n        recall history number n
  104. !string     recall previous command starting with "string"
  105. !$        recall last word of last command
  106. ^old^new[^]    replace "old" with "new" in last command
  107.  
  108. More than one !... substitution can be performed on a line. If any
  109. substitutions are made, the resulting command line is echoed. 
  110.  
  111. The built-in command "history [n]" displays the [last n commands of]
  112. the history buffer (and returns a null string).
  113.  
  114. A minimal escape mechanism is provided: if the first character of the
  115. line is a space, no history substitutions are performed. For example,
  116.  
  117. <space>find "!!" foo.c
  118.  
  119. ALIASES
  120. =======
  121. Aliases defined in the alias_file loaded when UNCLE is installed can
  122. be displayed with the built-in command "alias". After a command line
  123. is input and any history replacement performed, the first word (which
  124. cannot have leading spaces) is compared against the alias list. If
  125. a corresponding definition is found, the alias name is replaced with
  126. the definition in the command line.
  127.  
  128. NOTES
  129. =====
  130. Sorry about the cutesy name.
  131.  
  132. If a history or alias replacement results in a command that is too 
  133. long for the caller's buffer, it is silently truncated. 
  134.  
  135. Invalid history commands, and built-in commands, return an empty string
  136. to the caller.
  137.  
  138. UNCLE has been tested on XT and AT clones, with mono, CGA, and EGA.
  139. (You'll want non-default -i and -o values on CGA/EGA.)
  140.  
  141. PARALEGAL JUNK: I wrote it, I own it, I use it. 
  142. You can use it too. Just don't try to sell it, and don't risk anyone's
  143. life on it. Enough of that. Suggestions are welcome, donations are not
  144. required (but not refused). Suggestions accompanied by donations will
  145. probably get more attention (is that bribery?).
  146.  
  147. ANTI-FEATURES
  148. =============
  149. There is no way to uninstall UNCLE short of rebooting.
  150.  
  151. Control character inputs are displayed as graphic characters instead
  152. of "^?".
  153.  
  154. The escape mechanism is crude - you can't, for example, use an alias
  155. but bypass history expansion. Nor can you insert an editing character
  156. into the line.
  157.  
  158. UNCLE does not differentiate between COMMAND.COM and other callers.
  159.  
  160. No dynamic or recursive alias definitions.
  161.  
  162. UNCLE uses more memory than it needs to - initialization code is
  163. not deallocated. Buy me a better C compiler if this bothers you.
  164.  
  165. CHANGE HISTORY
  166. ==============
  167. version 1.0 - initial release
  168. version 1.1 - Fixed alias interpreting to allow terminating ^Z.
  169.     Increased stack allocation - this seems to fix problems with
  170.         nested command.com's (i.e. Push to DOS).
  171.     Cleaned up some problems in document.
  172. version 1.2 - Now I get it! Fixed TSR allocation correctly. 
  173.     Deallocating Environment block too.
  174. version 1.3 - Added environment deallocate option (some people like
  175.     to see the program name in memory block listings)
  176.     Added initial-space escape feature. Fixed a little bug with
  177.     up/down arrows.
  178.